using System;
using System.Xml.Serialization;

namespace Reminder
{
    public class Event
    {
        private string _name;
        private TimeSpan _interval;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        [XmlIgnore]
        public TimeSpan Interval
        {
            get { return _interval; }
            set { _interval = value; }
        }

        [XmlElement("Interval")]
        public string IntervalString
        {
            get { return _interval.ToString(); }
            set { _interval = TimeSpan.Parse(value); }
        }

        private DateTime _lastRemind = DateTime.Now;

        [XmlIgnore]
        public DateTime LastRemind
        {
            get { return _lastRemind; }
            set { _lastRemind = value; }
        }
    }
}
